import request from '../request.ts'

// 提交考试答案
export const submitExamAnswer = (data) => {
  return request({
    url: '/exam-answers/submit',
    method: 'post',
    data
  })
}

// 保存草稿答案
export const saveDraftAnswer = (data) => {
  return request({
    url: '/exam-answers/draft',
    method: 'post',
    data
  })
}

// 获取我的考试答案
export const getMyExamAnswer = (examId) => {
  return request({
    url: `/exam-answers/my/${examId}`,
    method: 'get'
  })
}

// 获取学生的考试答案
export const getStudentExamAnswer = (examId, studentId) => {
  return request({
    url: `/exam-answers/student/${examId}/${studentId}`,
    method: 'get'
  })
}

